export type GameRoleProp = {
    maxHp: number,
    curHp: number,
    atk: number
}

export default class GameRoleModel {
    private static _instance: GameRoleModel = null;
    public static getInstance(): GameRoleModel {
        if(this._instance == null){
            this._instance = new GameRoleModel();
        }
        return this._instance;
    }

    private _prop: GameRoleProp = null;
    public get prop(): GameRoleProp {
        return this._prop;
    }

    public curPos: cc.Vec2 = cc.Vec2.ZERO;

    public init(hp: number, atk: number): void{
        this._prop = {
            maxHp: hp,
            curHp: hp,
            atk: atk
        };
    }
}